'''
Created on 2019年10月10日

@author: sida
'''
import node_wordsMatrixOfBertSimilarity as node_wmb
import node_DistributionSimilarity as node_ds
node_wmb_similarity = node_wmb.node_wmb_similarity
node_ds_similarity = node_ds.node_ds_similarity
node_csvFile2Obj = node_ds.node_csvFile2Obj

def combination_similarity(cid=44):
    TopN = 6;
    import numpy as np
    index2Name = node_csvFile2Obj.getData()
    node_wmb_similarity.superParams[1]['cid'] = cid
    node_ds_similarity.superParams[1]['cid'] = cid
    wmb_similarity = node_wmb_similarity.getData()
    ds_similarity = node_ds_similarity.getData()
    cbnt_similarity = 1.5*wmb_similarity+ds_similarity
    work = cbnt_similarity
    keysSort = np.argsort(work)[-TopN:]
    print(keysSort)
    [print( index2Name.iloc[key],'Similarity',work[key] )for key in keysSort]
if __name__ == '__main__':
    combination_similarity(cid = 1504)
    
    
    
    
